{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T08:35:34.278114Z",
     "start_time": "2020-06-19T08:35:34.272448Z"
    }
   },
   "outputs": [],
   "source": [
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T08:35:40.636925Z",
     "start_time": "2020-06-19T08:35:40.619125Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['06-自然语言处理',\n",
       " '.git',\n",
       " '.gitignore',\n",
       " '未命名.ipynb',\n",
       " 'images',\n",
       " 'README.md',\n",
       " 'README.txt',\n",
       " 'scripts',\n",
       " '04-深度学习框架',\n",
       " '.vscode',\n",
       " '03-神经网络Python实现',\n",
       " '07-模型部署',\n",
       " 'notebooks',\n",
       " 'project3',\n",
       " '05-深度学习',\n",
       " '02-机器学习',\n",
       " 'models',\n",
       " '.ipynb_checkpoints',\n",
       " '.data',\n",
       " '01-传统模型',\n",
       " 'datasets']"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.listdir('.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T08:38:51.814902Z",
     "start_time": "2020-06-19T08:38:51.808530Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[01-传统模型](./01-传统模型)\n",
      "[02-机器学习](./02-机器学习)\n",
      "[03-神经网络Python实现](./03-神经网络Python实现)\n",
      "[04-深度学习框架](./04-深度学习框架)\n",
      "[05-深度学习](./05-深度学习)\n",
      "[06-自然语言处理](./06-自然语言处理)\n",
      "[07-模型部署](./07-模型部署)\n"
     ]
    }
   ],
   "source": [
    "with open('README.md', 'w') as f:\n",
    "    for file in sorted(os.listdir('.')):\n",
    "        if file.startswith('0'):\n",
    "            string = f\"[{file}]({'./' + file})\"\n",
    "            print(string)\n",
    "            f.write(string)\n",
    "            f.write('\\n\\n\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T08:53:37.470393Z",
     "start_time": "2020-06-19T08:53:37.464562Z"
    }
   },
   "outputs": [],
   "source": [
    "base_dir = './04-深度学习框架/'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-06-19T08:54:00.508506Z",
     "start_time": "2020-06-19T08:54:00.503088Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[.ipynb_checkpoints](./04-深度学习框架/.ipynb_checkpoints)\n",
      "[README.md](./04-深度学习框架/README.md)\n",
      "[TensorFlow](./04-深度学习框架/TensorFlow)\n",
      "[Torch](./04-深度学习框架/Torch)\n"
     ]
    }
   ],
   "source": [
    "for file in sorted(os.listdir(base_dir)):\n",
    "\n",
    "    name = parts[0]\n",
    "    print(f\"[{file}]({base_dir+file})\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
